package com.efast.cafe.portal.dao.statemach;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.efast.cafe.portal.bean.statemach.PortalStateMachField;

public interface PortalStateMachFieldDao {
	/**
	 * 根据流程和状态获取entity的display配置
	 * @param confId
	 * @param stateId
	 * @param entityName
	 * @param companyCode
	 * @param systemVer
	 * @param systemInd
	 * @return
	 */
	List<PortalStateMachField> getFieldForStateMach(@Param(value = "confId") Long confId,
			@Param(value = "stateId") Long stateId, @Param(value = "entityName") String entityName,
			@Param(value = "companyCode") String companyCode, @Param(value = "systemVer") String systemVer,
			@Param(value = "systemInd") String systemInd);

	/**
	 * 根据confId和企业ID删除entity配置
	 * @param confId
	 * @param companyCode
	 */
	void delFieldByConfig(@Param(value = "confId") Long confId, @Param(value = "companyCode") String companyCode);

	/**
	 * 批量插入entity配置
	 * @param fields
	 */
	void insertStateMachFields(@Param(value = "fields")List<PortalStateMachField> fields);

	/**
	 * 根据confId和企业ID获取entity配置
	 * @param confId
	 * @param companyCode
	 * @return
	 */
	List<PortalStateMachField> getStateMachFieldByConfig(@Param(value = "confId") Long confId,
			@Param(value = "companyCode") String companyCode);
}
